package com.sunxu.String;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

/**
 * @Author: 孙许
 * @Date: 2017/12/31
 * @Time: 12:23
 * @Description: try-catch-finally块管理资源
 */
public class Demo1 {
    public static void main(String[] args) {
        Set<String> list = new HashSet<>();
        list.add("sunxu");
        list.add("zhangsan");
        list.add("lisi");
        list.removeIf(e -> e.length() > 7);
        Iterator iterator = list.iterator();
        iterator.forEachRemaining(e -> System.out.println(e));

    }
}


